<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 模板列表
 */
class CreateWxTemplatemsg extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_templatemsgs', function (Blueprint $table) {
            $table->increments('id')->comment('序号');
            $table->string('template_key', 40)->default('')->comment('模板KEY');
            $table->string('template_id_short', 40)->default('')->comment('模板库中模板的编号');
            $table->string('template_id', 60)->default('')->comment('模板ID');
            $table->string('title', 150)->default('')->comment('模板标题');
            $table->string('primary_industry', 40)->default('')->comment('模板所属行业的一级行业');
            $table->string('deputy_industry', 40)->default('')->comment('模板所属行业的二级行业');
            $table->mediumText('content')->comment('模板内容');
            $table->mediumText('example')->comment('模板示例');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_templatemsgs');
    }
}
